<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ page import="java.sql.*" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<%@ include file="../bootstrap.jsp"%>
<title>打卡记录页面</title>
<body>
<h1 align=center>教师个人打卡记录</h1>
<hr>
<%
request.setCharacterEncoding("UTF-8");
Class.forName("org.mariadb.jdbc.Driver");
String url = "jdbc:mariadb://localhost:3306/epidemicmanagement";
Connection conn = DriverManager.getConnection(url,"root","123456");
Statement stmt = conn.createStatement();

 String UserNum =(String) request.getSession().getAttribute("UserNum");
ResultSet rs = stmt.executeQuery("select * from teachercheck where TeaId='"+UserNum+"' order by Date desc limit 0,5" );//最近五天的记录
%>
<text >最近五天打卡记录</text>
<table  class="table table-striped" width="80%"  align="center">
<caption >底部</caption>
<tr>
	<th>教师编号</th>
	<th>时间</th>
	<th>地区</th>
	<th>是否离(返)蓉</th>
	<th>健康码状态</th>
	<th>身体是否异常</th>
	<th>是否封控</th>
	<th>是否密接</th>
	<th>是否完成核酸</th>
	<th>是否承诺</th>
	
</tr>
<%
while(rs.next()){
	String TeaId = rs.getString("TeaId");
%>
<tr>	
	<td><%=rs.getString("TeaId")%></td>
	<td><%=rs.getString("Date")%></td>
	<td><%=rs.getString("Region")%></td>
	<td><%=rs.getString("IsChengDu")%></td>
	<td><%=rs.getString("CodeStatus")%></td>
	<td><%=rs.getString("IsHealth")%></td>
	<td><%=rs.getString("IsIsolate")%></td>
	<td><%=rs.getString("IsContact")%></td>
	<td><%=rs.getString("IsNuclein")%></td>
	<td><%=rs.getString("IsSure")%></td>
	
	
</tr>
<%}%>
</table>
<% 
rs.close();
stmt.close();
conn.close();%>
</body>
</html>